<%--
  Created by IntelliJ IDEA.
  User: bryant
  Date: 10/31/12
  Time: 2:34 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="code" uri="/WEB-INF/tld/code.tld" %>
<script type="text/javascript">
    $(document).ready(function(){
        $("#customerInsert").validationEngine('attach', {
            relative: true,
            overflownDIV:"#divOverflown",
            promptPosition:"bottomLeft"
        });
    });

</script>
<title>增加客户</title>
<div id="main-content">
    <s:if test="hasActionMessages()">
        <div class="notification success png_bg"> <a href="#" class="close"><img src="<%=request.getContextPath()%>/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
            <div> <s:actionmessage/></div>
        </div>
    </s:if>
    <div class="content-box">
        <div class="content-box-header" align="center">
            <h3>新增客户</h3>
            <ul class="content-box-tabs">
                <li><a href="#tab1" class="default-tab">输入表单</a></li>
            </ul>
            <div class="clear"></div>
            <div class="clear"></div>
        </div>
        <div class="content-box-content">
            <div class="tab-content default-tab" id="tab1">

                <form action="customer_insert" id="customerInsert" method="post">
                    <table>
                        <tr>
                            <td width="15%"><label>客户姓名</label></td>
                            <td><s:textfield name="customer.customerName" cssClass="text-input small-input validate[required]"/></td>
                        </tr>
                        <tr>
                            <td width="15%"><label>客户地址</label></td>
                            <td> <code:codeSelect id='municipio' name="customer.municipioId" cdTypeId="5" headerKey="" headerValue="请选择" cssClass="validate[required]"/>
                                &nbsp;
                                <select name="customer.townId" id='town' class="validate[required]">
                                    <option value="">请选择</option>
                                </select>
                                <select name="customer.villageId" id='village' class="validate[required]">
                                    <option value="">请选择</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td><label>手机号码</label></td>
                            <td><s:textfield name="customer.mobileNo" cssClass="text-input small-input validate[custom[number]]"/></td>
                        </tr>
                        <tr>
                            <td>
                                <label>座机号码</label>
                            </td>
                            <td><s:textfield name="customer.telephoneNo" cssClass="text-input small-input validate[custom[number]]"/></td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <input class="button" align="center" type="submit" value="添加" />&nbsp;
                                <input class="button" align="center" type="reset" value="重设" />
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
    </div>
</div>